package com.niu1078.base;

import android.app.Application;

import com.joanzapata.iconify.fonts.FontAwesomeModule;
import com.niu1078.R;
import com.niu1078.joe.app.Joe;
import com.niu1078.joe.ec.database.DatabaseManager;
import com.niu1078.joe.net.interceptors.DebugInterceptor;

/**
 * author :ywq .
 * time: 2017/12/18:17:58.
 * desc :
 * action:
 */

public class BaseApplication extends Application {


    @Override
    public void onCreate() {
        super.onCreate();

        /**
         * 配置
         */
        Joe.init(this)
                .withApiHost("https://api.niu1078.com/")
                .withIcon(new FontAwesomeModule())
                .withInterceptor(new DebugInterceptor("index", R.raw.test))
                .configure();

//初始化用户数据库
        DatabaseManager.getInstance().init(this);

    }
}
